<?php

/**
 *
 * @author DucPT
 */
class Core_Session {

    /**
     * Singleton instance
     */
    private static $_instances = array();

    /**
     *  Get token instance
     */
    public static function getInstance($namespace = 'default')
    {
        if (!isset(self::$_instances[$namespace]))
        {
            self::$_instances[$namespace] = new Zend_Session_Namespace($namespace);
        }

        return self::$_instances[$namespace];
    }

    /**
     * Reset token instance
     */
    public static function resetInstance($namespace)
    {
        isset(self::$_instances[$namespace]) && self::$_instances[$namespace] = null;
    }
   
}
?>
